//
//  DeviceListCell.swift
//  NewXueBa
//
//  Created by Shine on 2019/6/19.
//  Copyright © 2019 jmxQAQ. All rights reserved.
//

import UIKit

class DeviceListCell: UITableViewCell {

    @IBOutlet weak var deviceName: UILabel!
    @IBOutlet weak var connectState: UILabel!
    @IBOutlet weak var seekLaodImageV: UIImageView!
    
    var cellModel: BCDeviceModel? {
        didSet {
            if let model = cellModel {
                deviceName.text = model.device.deviceName
                connectState.text = model.connectState
                if model.connectState == "连接失败" {
                    connectState.textColor = UIColor.hex(hexString: "#F14970")
                } else {
                    connectState.textColor = UIColor.hex(hexString: "#7F899A")
                }
                
            }
        }
    }
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

    }

}
